3.46 \(\int \frac {1}{-3-5 \cos (c+d x)} \, dx\)

Optimal. Leaf size=65 \[ \frac {\log \left (2 \cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}-\frac {\log \left (\sin \left (\frac {1}{2} (c+d x)\right )+2 \cos \left (\frac {1}{2} (c+d x)\right )\right )}{4 d} \]

[Out]

1/4*ln(2*cos(1/2*d*x+1/2*c)-sin(1/2*d*x+1/2*c))/d-1/4*ln(2*cos(1/2*d*x+1/2*c)+sin(1/2*d*x+1/2*c))/d

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2659, 207} \[ \frac {\log \left (2 \cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}-\frac {\log \left (\sin \left (\frac {1}{2} (c+d x)\right )+2 \cos \left (\frac {1}{2} (c+d x)\right )\right )}{4 d} \]

Antiderivative was successfully verified.

[In]

Int[(-3 - 5*Cos[c + d*x])^(-1),x]

[Out]

Log[2*Cos[(c + d*x)/2] - Sin[(c + d*x)/2]]/(4*d) - Log[2*Cos[(c + d*x)/2] + Sin[(c + d*x)/2]]/(4*d)

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 2659

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[(2*e)/d, Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {1}{-3-5 \cos (c+d x)} \, dx &=\frac {2 \operatorname {Subst}\left (\int \frac {1}{-8+2 x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{d}\\ &=\frac {\log \left (2 \cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}-\frac {\log \left (2 \cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 65, normalized size = 1.00 \[ \frac {\log \left (2 \cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}-\frac {\log \left (\sin \left (\frac {1}{2} (c+d x)\right )+2 \cos \left (\frac {1}{2} (c+d x)\right )\right )}{4 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(-3 - 5*Cos[c + d*x])^(-1),x]

[Out]

Log[2*Cos[(c + d*x)/2] - Sin[(c + d*x)/2]]/(4*d) - Log[2*Cos[(c + d*x)/2] + Sin[(c + d*x)/2]]/(4*d)

________________________________________________________________________________________

fricas [A]  time = 0.73, size = 46, normalized size = 0.71 \[ -\frac {\log \left (\frac {3}{2} \, \cos \left (d x + c\right ) + 2 \, \sin \left (d x + c\right ) + \frac {5}{2}\right ) - \log \left (\frac {3}{2} \, \cos \left (d x + c\right ) - 2 \, \sin \left (d x + c\right ) + \frac {5}{2}\right )}{8 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-3-5*cos(d*x+c)),x, algorithm="fricas")

[Out]

-1/8*(log(3/2*cos(d*x + c) + 2*sin(d*x + c) + 5/2) - log(3/2*cos(d*x + c) - 2*sin(d*x + c) + 5/2))/d

________________________________________________________________________________________

giac [A]  time = 0.38, size = 34, normalized size = 0.52 \[ -\frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \right |}\right ) - \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \right |}\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-3-5*cos(d*x+c)),x, algorithm="giac")

[Out]

-1/4*(log(abs(tan(1/2*d*x + 1/2*c) + 2)) - log(abs(tan(1/2*d*x + 1/2*c) - 2)))/d

________________________________________________________________________________________

maple [A]  time = 0.03, size = 36, normalized size = 0.55 \[ -\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2\right )}{4 d}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2\right )}{4 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(-3-5*cos(d*x+c)),x)

[Out]

-1/4/d*ln(tan(1/2*d*x+1/2*c)+2)+1/4/d*ln(tan(1/2*d*x+1/2*c)-2)

________________________________________________________________________________________

maxima [A]  time = 1.39, size = 48, normalized size = 0.74 \[ -\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 2\right ) - \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 2\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-3-5*cos(d*x+c)),x, algorithm="maxima")

[Out]

-1/4*(log(sin(d*x + c)/(cos(d*x + c) + 1) + 2) - log(sin(d*x + c)/(cos(d*x + c) + 1) - 2))/d

________________________________________________________________________________________

mupad [B]  time = 0.26, size = 17, normalized size = 0.26 \[ -\frac {\mathrm {atanh}\left (\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}\right )}{2\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-1/(5*cos(c + d*x) + 3),x)

[Out]

-atanh(tan(c/2 + (d*x)/2)/2)/(2*d)

________________________________________________________________________________________

sympy [A]  time = 0.56, size = 42, normalized size = 0.65 \[ \begin {cases} \frac {\log {\left (\tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} - 2 \right )}}{4 d} - \frac {\log {\left (\tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} + 2 \right )}}{4 d} & \text {for}\: d \neq 0 \\\frac {x}{- 5 \cos {\relax (c )} - 3} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-3-5*cos(d*x+c)),x)

[Out]

Piecewise((log(tan(c/2 + d*x/2) - 2)/(4*d) - log(tan(c/2 + d*x/2) + 2)/(4*d), Ne(d, 0)), (x/(-5*cos(c) - 3), T
rue))

________________________________________________________________________________________